<template>
  <el-container>
    <el-header>煤气管理</el-header>
    <el-container>
      <el-aside width="15%">
        <Search v-on:search="search"/>
      </el-aside>
      <el-container>
        <el-main>
          <Main :data="name"/>
        </el-main>
      </el-container>
    </el-container>
    <el-footer>Footer</el-footer>
  </el-container>
</template>

<script>
  import Search from './Search'
  import Main from './Main'

  export default {
    name: 'Body',
    components: {Search, Main},
    data: () => ({
      records: '',
      name:'',
    }),
    methods: {
      search(name) {
        this.name = name
      }
    }
  }
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
  .el-header, .el-footer {
    color: #333;
    text-align: center;
    line-height: 60px;
    height: 40px;
  }

  .el-aside {
    padding: 5px;
    scrollbar-base-color: transparent;
    scrollbar-darkshadow-color: transparent;
    scrollbar-highlight-color: transparent;
    scrollbar-face-color: transparent;
    background-color: #EBEEF5;
    color: #333;
    text-align: left;
    height: 600px;
  }



  .el-main {
    background-color: #DCDFE6;
    color: #333;
    /*text-align: center;*/
    line-height: 30px;
    padding: 10px 20px 0 20px;
  }

  body > .el-container {
    /*margin-bottom: 40px;*/
  }

  .el-container:nth-child(5) .el-aside,
  .el-container:nth-child(6) .el-aside {
    line-height: 260px;
  }

  .el-container:nth-child(7) .el-aside {
    line-height: 320px;
  }
</style>
